let data = localStorage.getItem("homeDataPc");
let {webSiteFavicon ,webSiteTitle,webSiteDesc} = data? JSON.parse(data):{webSiteFavicon:'',webSiteTitle:'',webSiteDesc:''}

export default async function ({ app }) {
  try {
    let link = app.head.link
    if (link.length == 0) {
      link.push({
        rel: 'icon',
        href: webSiteFavicon,
        type: 'image/x-icon'
      })
    } else {
      link.find((item, index) => {
        if (item.rel == 'icon') {
          link[index] = {
            rel: 'icon',
            href: webSiteFavicon,
            type: 'image/x-icon'
          }
        }
      })
    }

    app.head.meta[4].content =webSiteDesc
    app.head.link = link
    app.head.title = webSiteTitle
  } catch (error) {}
}


